//package com.cdinternationalcompany.syhapp.common.channel
//
//import android.app.Activity
//import android.content.BroadcastReceiver
//import android.content.Context
//import android.content.Intent
//import android.content.IntentFilter
//import com.cdinternationalcompany.syhapp.BuildConfig
//import com.tencent.mm.opensdk.constants.ConstantsAPI
//import com.tencent.mm.opensdk.modelmsg.SendAuth
//import com.tencent.mm.opensdk.openapi.IWXAPI
//import com.tencent.mm.opensdk.openapi.WXAPIFactory
//import io.flutter.plugin.common.MethodChannel
//
//
//class WeChatLoginApi(private val activity: Activity) : BaseApi<String, String>() {
//    companion object {
//        private val TAG = WeChatLoginApi::class.java.simpleName
//        const val REQUEST_METHOD = "ThirdPartLogin/loginByWwChat"
//        const val RESPONSE_METHOD = "ThirdPartLogin/loginResult"
//        const val WX_APP_ID = "wx3cf765d397e91051"
//    }
//
//    private var mWxApi: IWXAPI
//
//    init {
//        mWxApi = WXAPIFactory.createWXAPI(activity, WX_APP_ID, BuildConfig.DEBUG)
//        activity.registerReceiver(object : BroadcastReceiver() {
//            override fun onReceive(context: Context?, intent: Intent?) {
//                mWxApi.registerApp(WX_APP_ID)
//            }
//        }, IntentFilter(ConstantsAPI.ACTION_REFRESH_WXAPP))
//    }
//
//    override fun doAction(param: String, result: MethodChannel.Result) {
//        val req: SendAuth.Req = SendAuth.Req()
//        req.scope = "snsapi_userinfo"
//        req.state = "none"
//        mWxApi.sendReq(req)
//    }
//
//}